package com.mingtu.jgspatrol.adapter;

import androidx.annotation.NonNull;

import com.blankj.utilcode.util.StringUtils;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.mingtu.jgspatrol.R;
import com.mingtu.jgspatrol.bean.ReportRecordLeaderBean;

public class RecordReportAdapter extends BaseQuickAdapter<ReportRecordLeaderBean.PageBean.ListBean, BaseViewHolder> {
    public RecordReportAdapter() {
        super(R.layout.item_record_report);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, ReportRecordLeaderBean.PageBean.ListBean listBean) {
        String name = listBean.getName();
        String tvTimes1 = listBean.getType1();
        String tvTimes2 = listBean.getType2();
        String tvTimes3 = listBean.getType3();
        String tvTimes4 = listBean.getType4();

        if(!StringUtils.isEmpty(name)){
            helper.setText(R.id.tv_name,name);
        }

        if(!StringUtils.isEmpty(name)){
            helper.setText(R.id.tv_times1,tvTimes1);
        }

        if(!StringUtils.isEmpty(name)){
            helper.setText(R.id.tv_times2,tvTimes2);
        }
        if(!StringUtils.isEmpty(name)){
            helper.setText(R.id.tv_times3,tvTimes3);
        }
        if(!StringUtils.isEmpty(name)){
            helper.setText(R.id.tv_times4,tvTimes4);
        }

    }

}
